package com.example.scaffold.common.constant;

/**
 * Redis键常量类
 * 遵循阿里手册：常量定义规范，缓存键统一管理
 *
 * @author example
 */
public class RedisKeyConstant {

    /**
     * 缓存键前缀（区分不同应用）
     */
    public static final String CACHE_PREFIX = "scaffold:";

    /**
     * 用户信息缓存键前缀
     */
    public static final String USER_INFO_KEY = CACHE_PREFIX + "user:info:%s";

    /**
     * 订单信息缓存键前缀
     */
    public static final String ORDER_INFO_KEY = CACHE_PREFIX + "order:info:%s";

    /**
     * 机构信息缓存键
     */
    public static final String ORGANIZATION_INFO_KEY = "organization:info:%d";

    /**
     * 用户权限缓存键前缀
     */
    public static final String USER_PERMISSION_KEY = CACHE_PREFIX + "user:permission:";

    /**
     * 角色信息缓存键前缀
     */
    public static final String ROLE_INFO_KEY = CACHE_PREFIX + "role:info:";

    /**
     * 字典缓存键前缀
     */
    public static final String DICT_KEY = CACHE_PREFIX + "dict:";

    /**
     * 系统配置缓存键
     */
    public static final String SYS_CONFIG_KEY = CACHE_PREFIX + "sys:config";

    /**
     * 防重复提交缓存键前缀
     */
    public static final String REPEAT_SUBMIT_KEY = CACHE_PREFIX + "repeat:submit:";

    /**
     * 验证码缓存键前缀
     */
    public static final String CAPTCHA_KEY = CACHE_PREFIX + "captcha:";

    /**
     * 禁止实例化
     * 遵循阿里手册：工具类/常量类不应提供public构造方法
     */
    private RedisKeyConstant() {
        throw new AssertionError("不允许实例化该类");
    }
}
    